package com.gvfish.core;

import java.util.ArrayList;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import net.sf.dozer.util.mapping.DozerBeanMapper;

/**
 * 在Bean间复制数据 更多信息请访问 http://dozer.sourceforge.net/
 * 
 * @author lixy 2006-9-13 12:13:00
 * 
 */
public class DozerBeanMapperFactory {

	private static final Log log = LogFactory
			.getLog(DozerBeanMapperFactory.class);
	private static DozerBeanMapper mapp = null;;

	public static DozerBeanMapper getMapper() {
		if (mapp == null) {
			mapp = new DozerBeanMapper();
			List mappingFiles = new ArrayList();
			mappingFiles.add("myDozerBeanMapping.xml");
			mapp.setMappingFiles(mappingFiles);
			log.debug("Dozer init successfully!");
		}
		return mapp;
	}
}